package cn.hx.mall.order.entity;

import java.util.List;

public class PageModel<T> {
    private Integer page;
    private Integer size;
    private Integer pageSize;
    private Integer count;
    private List<T> list;

    public static PageModel getInstance(int page, int size) {
        return new PageModel(page, size);
    }

    private PageModel(Integer page, Integer size) {
        this.page = page;
        this.size = size;
    }

    public PageModel() {
    }

    @Override
    public String toString() {
        return "PageModel{" +
                "page=" + page +
                ", size=" + size +
                ", pageSize=" + pageSize +
                ", count=" + count +
                ", list=" + list +
                '}';
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
